[% setvar title system() should return useful values %]
<div id="archive-notice">
    <h3>This file is part of the Perl 6 Archive</h3>
    <p>To see what is currently happening visit <a href="http://www.perl6.org/">http://www.perl6.org/</a></p>
</div>
<div class='pod'>
<a name='TITLE'></a><h1>TITLE</h1>
<p>system() should return useful values</p>
<a name='VERSION'></a><h1>VERSION</h1>
<pre>  Maintainer: Nathan Torkington &lt;<a href='mailto:gnat@frii.com'>gnat@frii.com</a>&gt;
  Date: 13 Sep 2000
  Mailing List: <a href='mailto:perl6-language@perl.org'>perl6-language@perl.org</a>
  Number: 221
  Version: 1
  Status: Developing</pre>
<a name='ABSTRACT'></a><h1>ABSTRACT</h1>
<p>system() should return true if the program exited normally, false
otherwise.</p>
<a name='DESCRIPTION'></a><h1>DESCRIPTION</h1>
<p>In perl5, system() returns the wait status of the program: 0 if it
succeeded, a positive number if it failed.  This means you can't test
for failure with &quot;|| die&quot; as you can with so many other Perl
functions.</p>
<p>I propose changing it so that system() returns false on failure and
true on success.</p>
<p>It would no longer return the exit status of the program, which would
need to be collected through <code>$?</code> or its perl6 replacement.</p>
<a name='IMPLEMENTATION'></a><h1>IMPLEMENTATION</h1>
<p>Simple change to the pp_code for system().</p>
<p>The perl526 translator would replace system() with:</p>
<pre>  do { system(...); $? }</pre>
<a name='REFERENCES'></a><h1>REFERENCES</h1>
<p>perlfunc manpage for description of system()</p>
<p>perlvar manpage for description of $?</p>
</div>
